package cn.accp.bookshop;

import java.io.Serializable;

/**
 * 书类
 * 
 * 实现java.io.Serializable是为了让此类的对象支持序列化
 * 
 * @author Jiangqs
 * 
 */
public class Book implements Serializable {
	private int id;
	private String title;
	private double price;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public Book(int id, String title, double price) {
		super();
		this.id = id;
		this.title = title;
		this.price = price;
	}

	public Book() {

	}

	public String showMe() {
		return this.id + "\t" + this.title + "\t" + this.price;
	}

	@Override
	public String toString() {
		return "Book [id=" + id + ", title=" + title + ", price=" + price + "]";
	}
}
